package mailDAO;

import java.util.Date;
import java.util.List;

import mail.Mail;
import mail.User;

public interface MailDAO {
	public Mail loadMailById(long id);
	public List<Mail> loadMailNotRead(User toUser);	
	public List<Mail> loadPageMailNotRead(User toUser,int recordStart, int pageSize);
	public List<Mail> loadMailRead(User toUser);
	public List<Mail> loadPageMailRead(User toUser,int recordStart, int pageSize);
	public List<Mail> loadMailInbox(User toUser);
	public List<Mail> loadPageMailInbox(User toUser,int recordStart, int pageSize);
	public List<Mail> loadMailOutbox(User fromUser);
	public List<Mail> loadPageMailOutbox(User fromUser,int recordStart, int pageSize);	
	public List<Mail> loadMailDustbin(User toUser);	
	public List<Mail> loadPageMailDustbin(User toUser,int recordStart, int pageSize);	
	public void setMailRead(Mail mail);
	public void setReadTime(Mail mail, Date readTime);
	public void toUserSetMailDustbin(Mail mail);
	public void fromUserSetMailDustbin(Mail mail);
	public void toUserDeleteMail(Mail mail);
	public void fromUserDeleteMail(Mail mail);
	public void saveMail(Mail mail);
	public void deleteMail(Mail mail);

}
